const std = @import("std");

pub fn dumpStackTrace(comptime deep: u8) void {
    var address_buffer: [deep]usize = undefined;
    var trace = std.builtin.StackTrace{
        .index = 0,
        .instruction_addresses = address_buffer[0..],
    };

    std.debug.captureStackTrace(null, &trace);
    std.debug.dumpStackTrace(trace);
}
